<template>
  <div class="home">
    <div class="hero-section">
      <img alt="Vue logo" src="../assets/logo.png" class="logo">
      <h1>旅游景点标注系统</h1>
      <p>创建交互式的景点地图，为您的旅游项目添加丰富的标注功能</p>

      <div class="action-buttons">
        <el-button
          type="primary"
          size="large"
          :icon="Edit"
          @click="$router.push('/annotation-editor')"
        >
          开始编辑
        </el-button>
        <el-button
          type="success"
          size="large"
          :icon="View"
          @click="$router.push('/annotation-viewer')"
        >
          预览模式
        </el-button>
      </div>
    </div>

    <div class="features-section">
      <h2>功能特色</h2>
      <div class="features-grid">
        <div class="feature-card">
          <el-icon class="feature-icon"><Upload /></el-icon>
          <h3>图片上传</h3>
          <p>支持上传各种格式的底图，作为标注的基础</p>
        </div>
        <div class="feature-card">
          <el-icon class="feature-icon"><Location /></el-icon>
          <h3>精确标注</h3>
          <p>点击图片任意位置添加标注点，支持自定义标题和描述</p>
        </div>
        <div class="feature-card">
          <el-icon class="feature-icon"><Monitor /></el-icon>
          <h3>响应式预览</h3>
          <p>自适应不同屏幕尺寸，完美支持大屏展示</p>
        </div>
        <div class="feature-card">
          <el-icon class="feature-icon"><Setting /></el-icon>
          <h3>数据管理</h3>
          <p>本地存储标注数据，支持导入导出功能</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { Edit, View, Upload, Location, Monitor, Setting } from '@element-plus/icons-vue'

export default {
  name: 'HomeView',
  components: {
    Edit,
    View,
    Upload,
    Location,
    Monitor,
    Setting
  }
}
</script>

<style scoped>
.home {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-section {
  text-align: center;
  padding: 80px 20px;
  color: white;
}

.logo {
  width: 100px;
  height: 100px;
  margin-bottom: 30px;
}

.hero-section h1 {
  font-size: 48px;
  font-weight: 700;
  margin: 0 0 20px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section p {
  font-size: 20px;
  margin: 0 0 40px 0;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.action-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.features-section {
  background: white;
  padding: 80px 20px;
  text-align: center;
}

.features-section h2 {
  font-size: 36px;
  color: #303133;
  margin: 0 0 50px 0;
  font-weight: 600;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  padding: 40px 20px;
  border-radius: 12px;
  background: #f8f9fa;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-color: #409eff;
}

.feature-icon {
  font-size: 48px;
  color: #409eff;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 24px;
  color: #303133;
  margin: 0 0 15px 0;
  font-weight: 600;
}

.feature-card p {
  color: #606266;
  line-height: 1.6;
  margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hero-section {
    padding: 60px 15px;
  }

  .hero-section h1 {
    font-size: 36px;
  }

  .hero-section p {
    font-size: 16px;
  }

  .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  .action-buttons .el-button {
    width: 200px;
  }

  .features-section {
    padding: 60px 15px;
  }

  .features-section h2 {
    font-size: 28px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-card {
    padding: 30px 15px;
  }
}
</style>
